# -*- coding: utf-8 -*-


class Stack:
    def __init__(self):
        self.items = []

    def is_empty(self):
        return self.items == []

    def push(self, item):
        self.items.append(item)

    def pop(self):
        if self.is_empty():
            return None
        return self.items.pop()

    def peek(self):
        return self.items[len(self.items)-1]

    def size(self):
        return len(self.items)


if __name__ == '__main__':
    stack1 = Stack()
    stack2 = Stack()
    stack1.push(1)
    stack1.push(2)
    stack1.push(3)
    stack1.push(4)

    for idx in range(stack1.size()):
        stack2.push(stack1.pop())

    for idx in range(stack2.size()):
        print(stack2.pop())
